FROM czernika/laravel-frankenphp-8.3

# Install XDebug
RUN pecl install xdebug && \
    docker-php-ext-enable xdebug

# Copy settings
COPY ./conf.d/99-xdebug.ini ${PHP_INI_DIR}/conf.d

# Make start script file executable
COPY ./start.sh /usr/local/bin/start-app
RUN chmod +x /usr/local/bin/start-app

# Set working directory
WORKDIR /var/www/html

# Run app as Frankenstein
USER frankenstein

# Start
ENTRYPOINT [ "start-app" ]
